package controller;

import java.net.InetAddress;

import chatsystemTDa2.Message;

/**
 * This class gathers the useful informations of a model
 */
public class Msg {

	/**
	 * the message
	 * the ip address of the user who sends it or the user to which the message has to be sent
	 */
	private Message m;
	private InetAddress ip;
	
	/**
	 * @param m is the message
	 * @param ip is the ip address of the recipient or the sender
	 */
	public Msg (Message m, InetAddress ip){
		this.m = m;
		this.ip = ip;
	}
	
	/**
	 * @return the message
	 */
	public Message getMsg(){
		return this.m;
	}
	
	/**
	 * @return the ip address
	 */
	public InetAddress getIp(){
		return this.ip;
	}
}
